﻿using HDS.Model;
using HDS.SupplierApi.Core.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HDS.IService.HotelApi
{
    public interface IHotelApiService
    {
        /// <summary>
        /// 搜索价格，母酒店ID
        /// </summary>
        /// <param name="distributor"></param>
        /// <param name="hotelId"></param>
        /// <param name="checkinDate"></param>
        /// <param name="checkoutDate"></param>
        /// <param name="roomGuest"></param>
        /// <param name="trackId"></param>
        /// <param name="millisecondTimeOut"></param>
        /// <returns></returns>
        Task<ResultData<List<DistributorRate>>> SearchRate(string distributor, int hotelId, DateTime checkinDate, DateTime checkoutDate, RoomGuest roomGuest, string currencyCode, string trackId, int millisecondTimeOut);

        /// <summary>
        /// 搜索价格，供应商多ID
        /// </summary>
        /// <param name="supplier"></param>
        /// <param name="supplierHotelIds"></param>
        /// <param name="checkinDate"></param>
        /// <param name="checkoutDate"></param>
        /// <param name="roomGuest"></param>
        /// <param name="trackId"></param>
        /// <param name="millisecondTimeOut"></param>
        /// <returns></returns>
        Task<ResultData<List<SupplierRate>>> SearchRate(string supplier, string[] supplierHotelIds, DateTime checkinDate, DateTime checkoutDate, RoomGuest roomGuest, string trackId, int millisecondTimeOut);

        /// <summary>
        /// 确认价格
        /// </summary>
        /// <param name="distributor"></param>
        /// <param name="hotelId"></param>
        /// <param name="checkinDate"></param>
        /// <param name="checkoutDate"></param>
        /// <param name="roomGuest"></param>
        /// <param name="roomId"></param>
        /// <param name="ratePlanId"></param>
        /// <param name="trackId"></param>
        /// <param name="millisecondTimeOut"></param>
        /// <returns></returns>
        Task<ResultData<DistributorRate>> ConfirmRate(string distributor, int hotelId, DateTime checkinDate, DateTime checkoutDate, RoomGuest roomGuest, int roomId, string ratePlanId, string currencyCode, string trackId, int millisecondTimeOut);

        /// <summary>
        /// 预订
        /// </summary>
        /// <param name="distributor"></param>
        /// <param name="hotelId"></param>
        /// <param name="checkinDate"></param>
        /// <param name="checkoutDate"></param>
        /// <param name="roomGuest"></param>
        /// <param name="roomId"></param>
        /// <param name="ratePlanId"></param>
        /// <param name="orderId"></param>
        /// <param name="guestRequest"></param>
        /// <param name="millisecondTimeOut"></param>
        /// <returns></returns>
        Task<ResultData<SupplierOrderInfo>> Reservation(string distributor, int hotelId, DateTime checkinDate, DateTime checkoutDate, RoomGuest roomGuest, int roomId, string ratePlanId, string distributorOrderId, string orderId, Money price, string guestRequest, int millisecondTimeOut, int updatedBy = 0, string updatedByName = "system");

        /// <summary>
        /// 取消分销商订单
        /// </summary>
        Task<ResultData<int>> CancelDistributorOrder(string distributor, string distributorOrderId, int millisecondTimeOut, int updatedBy = 0, string updatedByName = "system");

        /// <summary>
        /// 取消供应商订单
        /// </summary>
        Task<ResultData<int>> CancelSupplierOrder(string supplier, string supplierOrderId, string orderId, Dictionary<string, string> supplierExtras, int millisecondTimeOut, int updatedBy = 0, string updatedByName = "system");

        /// <summary>
        /// 获取预订信息
        /// </summary>
        /// <param name="orderId"></param>
        /// <param name="supplier"></param>
        /// <param name="supplierOrderId"></param>
        /// <param name="extras"></param>
        /// <param name="millisecondTimeOut"></param>
        /// <returns></returns>
        Task<ResultData<SupplierOrderInfo>> GetOrder(string orderId, string supplier, string supplierOrderId, Dictionary<string, string> extras, int millisecondTimeOut);
    }
}